<%--
  Created by IntelliJ IDEA.
  User: LMY
  Date: 2025/6/21
  Time: 20:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
      <title>域对象的使用</title>
  </head>
  <body>
  <h1>四个域对象在scope2获取的情况</h1>
<%--
  1.如果 scope.jsp 请求转发到 scope2.jsp, 除了pageContext-k1取不到值，其余都可取到
  2.如果 scope.jsp 重定向到 scope2.jsp, 除了pageContext-k1,request-k1取不到，其余都可取到
  3.换个浏览器请求 scope2.jsp,新的浏览器只能访问application-k1
  4.作用范围：pageContext < request < session < application
--%>
  pageContext-k1: <%=pageContext.getAttribute("k1")%><br/>
  request-k1: <%=request.getAttribute("k1")%><br/>
  session-k1: <%=session.getAttribute("k1")%><br/>
  application-k1: <%=application.getAttribute("k1")%>

  </body>
</html>
